package com.lims.admin.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javacommon.base.*;
import cn.org.rapid_framework.page.*;

import com.lims.admin.model.*;
import com.lims.admin.dao.*;
import com.lims.admin.vo.query.*;

/**
 * @author zzh
 * @version 1.0
 * @since 1.0
 */@Service
@Transactional @SuppressWarnings("unchecked")
public class DiccolumnsManager extends BaseManager<Diccolumns,java.lang.String>{

	private DiccolumnsDao diccolumnsDao;
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	public void setDiccolumnsDao(DiccolumnsDao dao) {
		this.diccolumnsDao = dao;
	}
	
	public EntityDao getEntityDao() {
		return this.diccolumnsDao;
	}
	
	@Transactional(readOnly=true)
	public Page findPage(DiccolumnsQuery query) {
		return diccolumnsDao.findPage(query);
	}
	
	@Transactional(readOnly=true)
	public ListRange findRange(DiccolumnsQuery query) {
		Page page = this.diccolumnsDao.findPage(query);
		ListRange listRange = new ListRange();
		listRange.setRows(page.getResult().toArray());
		listRange.setTotal(page.getTotalCount());
		return listRange;
	}
	
}
